package com.example.chatgpt.entity;

import androidx.room.ColumnInfo;
import androidx.room.Entity;
import androidx.room.Ignore;
import androidx.room.PrimaryKey;

@Entity(tableName ="message")
public class MessageInfo {
    @PrimaryKey(autoGenerate = true)
    public long id;
    @ColumnInfo(name = "message" , typeAffinity = ColumnInfo.TEXT)
    public String message;
    @ColumnInfo(name = "set_by" , typeAffinity = ColumnInfo.TEXT)
    public String setBy;
    @ColumnInfo(name = "date" , typeAffinity = ColumnInfo.TEXT)
    public String date;
    @ColumnInfo(name = "user" , typeAffinity = ColumnInfo.TEXT)
    public String user;

    public String getUser() {
        return user;
    }

    public void setUser(String user) {
        this.user = user;
    }

    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public String getSetBy() {
        return setBy;
    }

    public void setSetBy(String setBy) {
        this.setBy = setBy;
    }

    public String getDate() {
        return date;
    }

    public void setDate(String date) {
        this.date = date;
    }

    @Ignore
    public MessageInfo(String message, String setBy, String date) {
        this.message = message;
        this.setBy = setBy;
        this.date = date;
    }

    public MessageInfo(String message, String setBy, String date, String user) {
        this.message = message;
        this.setBy = setBy;
        this.date = date;
        this.user = user;
    }
}
